package com.itheima.Jiuye14;

import java.util.concurrent.ArrayBlockingQueue;

public class Foodie extends Thread {
    private ArrayBlockingQueue arr;
    public Foodie(ArrayBlockingQueue arr) {
        this.arr = arr;
    }

    @Override
    public void run() {
        while (true) {
            try {
                arr.put("汉堡包");
                System.out.println("厨师放了一个汉堡");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        //super.run();
    }
}
